package cn.edu.gzu.mapper;

import cn.edu.gzu.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    // 可自定义扩展的方法

    /*根据电话和密码查询房东，用于登录验证*/
    @Select("SELECT * FROM user WHERE phone_num = #{phone} AND password = #{pwd}")
    User getByPhoneAndPwd(@Param("phone") String phone, @Param("pwd") String pwd);
}